package edu.gatech.volt2.drdoommgt.gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.SpringLayout;
import javax.swing.JLabel;
import javax.swing.JTextPane;
import javax.swing.JTextArea;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.JButton;

public class PatientInvoice extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					PatientInvoice frame = new PatientInvoice();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public PatientInvoice() {
		setTitle("Invoice");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 350, 229);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		SpringLayout sl_contentPane = new SpringLayout();
		contentPane.setLayout(sl_contentPane);
		
		JLabel lblPatient = new JLabel("Patient:");
		sl_contentPane.putConstraint(SpringLayout.WEST, lblPatient, 30, SpringLayout.WEST, contentPane);
		contentPane.add(lblPatient);
		
		JLabel lblDateOfVisit = new JLabel("Date of visit:");
		sl_contentPane.putConstraint(SpringLayout.WEST, lblDateOfVisit, 0, SpringLayout.WEST, lblPatient);
		contentPane.add(lblDateOfVisit);
		
		JLabel lblDoctor = new JLabel("Doctor:");
		sl_contentPane.putConstraint(SpringLayout.EAST, lblDoctor, 0, SpringLayout.EAST, lblPatient);
		contentPane.add(lblDoctor);
		
		JLabel lblServices = new JLabel("Services:");
		sl_contentPane.putConstraint(SpringLayout.WEST, lblServices, 0, SpringLayout.WEST, lblPatient);
		contentPane.add(lblServices);
		
		textField = new JTextField();
		sl_contentPane.putConstraint(SpringLayout.WEST, textField, 98, SpringLayout.EAST, lblPatient);
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblPatient, 6, SpringLayout.NORTH, textField);
		sl_contentPane.putConstraint(SpringLayout.NORTH, textField, 10, SpringLayout.NORTH, contentPane);
		contentPane.add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		sl_contentPane.putConstraint(SpringLayout.WEST, textField_1, 64, SpringLayout.EAST, lblDateOfVisit);
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblDateOfVisit, 6, SpringLayout.NORTH, textField_1);
		sl_contentPane.putConstraint(SpringLayout.NORTH, textField_1, 7, SpringLayout.SOUTH, textField);
		contentPane.add(textField_1);
		textField_1.setColumns(10);
		
		textField_2 = new JTextField();
		sl_contentPane.putConstraint(SpringLayout.WEST, textField_2, 98, SpringLayout.EAST, lblDoctor);
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblDoctor, 6, SpringLayout.NORTH, textField_2);
		sl_contentPane.putConstraint(SpringLayout.NORTH, textField_2, 6, SpringLayout.SOUTH, textField_1);
		contentPane.add(textField_2);
		textField_2.setColumns(10);
		
		textField_3 = new JTextField();
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblServices, 6, SpringLayout.NORTH, textField_3);
		sl_contentPane.putConstraint(SpringLayout.NORTH, textField_3, 6, SpringLayout.SOUTH, textField_2);
		sl_contentPane.putConstraint(SpringLayout.WEST, textField_3, 0, SpringLayout.WEST, textField);
		contentPane.add(textField_3);
		textField_3.setColumns(10);
		
		JButton btnSubmit = new JButton("Submit");
		sl_contentPane.putConstraint(SpringLayout.SOUTH, btnSubmit, -10, SpringLayout.SOUTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, btnSubmit, 0, SpringLayout.EAST, lblDateOfVisit);
		contentPane.add(btnSubmit);
		
		JButton btnExit = new JButton("Exit");
		sl_contentPane.putConstraint(SpringLayout.NORTH, btnExit, 0, SpringLayout.NORTH, btnSubmit);
		sl_contentPane.putConstraint(SpringLayout.EAST, btnExit, -29, SpringLayout.EAST, contentPane);
		contentPane.add(btnExit);
	}
}
